package top.fyxxxx.dbdesign.data;


public class SignInTask implements Comparable<SignInTask>{
    private long sid;//任务编号
    private long createByUid;//由Uid用户建立
    private long createTime;//创建时间
    private long beginTime;//开始时间
    private long endTime;//结束时间
    private long belongToCid;//属于Cid课程
    public SignInTask(){}
    public SignInTask(long sid,long createByUid,long createTime ,long beginTime,long endTime,long belongToCid)
    {
        this.sid=sid;
        this.createByUid=createByUid;
        this.createTime=createTime;
        this.beginTime=beginTime;
        this.endTime=endTime;
        this.belongToCid=belongToCid;
    }
    public long getCreateByUid() {
        return createByUid;
    }

    public long getBelongToCid() {
        return belongToCid;
    }

    public long getSid() {
        return sid;
    }

    public long getBeginTime() {
        return beginTime;
    }

    public long getCreateTime() {
        return createTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setBeginTime(long beginTime) {
        this.beginTime = beginTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public void setSid(long sid) {
        this.sid = sid;
    }

    public void setBelongToCid(long belongToCid) {
        this.belongToCid = belongToCid;
    }

    public void setCreateByUid(long createByUid) {
        this.createByUid = createByUid;
    }

    @Override
    public int compareTo(SignInTask o) {
        return Long.compare(createTime,o.createTime);
    }

    @Override
    public int hashCode(){
        return Long.valueOf(sid).hashCode();
    }

    @Override
    public boolean equals(Object o){
        if(o instanceof SignInTask){
            return sid == ((SignInTask) o).sid;
        }
        return false;
    }
}
